package com.lt.integration.jpa.component.hibernate;

import javax.persistence.metamodel.Attribute;
import java.util.Map;

/**
 * @author: xiaobin
 * @create: 2020-09-05 17:36
 */
public class UpdateWhere {

    private final Map<Attribute<?, ?>, Object> condition;
    public UpdateWhere(Map<Attribute<?, ?>, Object> condition) {
        this.condition = condition;
    }

    public UpdateWhere equal(Attribute<?, ?> property, Object value) {
        condition.put(property, value);
        return this;
    }
}
